#ifndef SETTINGS_H
#define SETTINGS_H

#include <QSettings>
#include <QObject>
#include <QMutex>

class Settings : QObject
{
    Q_OBJECT
public:
    explicit Settings(const QString fileName, QSettings::Format format, QObject *parent = Q_NULLPTR);
    ~Settings();
    void setValue(const QString group, const QString key, const QVariant value);
    QVariant getValue(const QString group, const QString key, const QVariant defaultValue = QVariant());
    void remove(const QString group, const QString key);
    void remove(const QString groupAndkey);
    bool GetFirstNodeInfo(const QString group,QString & key,QVariant & value);
    QSettings* getQSettings();
private:
    QSettings* m_setting;
    QMutex m_mutex;

};

#endif // SETTINGS_H
